package com.wzh.controll;
import com.wzh.pojo.Po.UserZp;
import com.wzh.pojo.Po.Users;
import com.wzh.pojo.Req.DataReq;
import com.wzh.pojo.Resp.DataResp;
import com.wzh.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@Controller
@RequestMapping("/User")
public class UserController {
	@Autowired
	private UserService userService;

	@PostMapping("/show")
	@ResponseBody
	public DataResp show(@RequestBody DataReq req){
		DataResp<Object> resp= userService.show(req);
		return resp;
	};

	@PostMapping("/addUser")
	@ResponseBody
	public DataResp add(@RequestBody Users users){
		System.out.println(users);
		DataResp<Object> resp= userService.addusers(users);
		return resp;
	};

}
